$OpenBSD: patch-mkspecs_features_create_cmake_prf,v 1.1.1.1 2016/12/25 14:13:11 zhuk Exp $
Make sure correct library filenames get propagated into CMake package
config files.
--- mkspecs/features/create_cmake.prf.orig	Tue Oct 13 07:35:32 2015
+++ mkspecs/features/create_cmake.prf	Thu Dec 10 09:01:21 2015
@@ -265,10 +265,16 @@ mac {
         CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.so
         CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.so
         CMAKE_LIB_SONAME = lib$${CMAKE_QT_STEM}.so
-    } else {
-        CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.VERSION)
-        CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.VERSION)
-        CMAKE_LIB_SONAME = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.MAJOR_VERSION)
+    } else:eval(LIBVER_OVERRIDE = \$\$(LIB$${CMAKE_QT_STEM}_VERSION)) {
+        !isEmpty(QMAKE_OPENBSD_SHLIB):!isEmpty(LIBVER_OVERRIDE) {
+            # OpenBSD-style version overriding, no SONAME intended
+            CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.so.$${LIBVER_OVERRIDE}
+            CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.so.$${LIBVER_OVERRIDE}
+        } else {
+            CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.VERSION)
+            CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.VERSION)
+            CMAKE_LIB_SONAME = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.MAJOR_VERSION)
+        }
     }
 }
 
